package com.esri.core.map;

import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class RangeDomain extends Domain {
    private static final long serialVersionUID = 1;
    private double a;
    private double b;

    public RangeDomain(String str, double d, double d2) {
        this.domainName = str;
        this.a = d;
        this.b = d2;
    }

    public RangeDomain() {
    }

    public double getMinValue() {
        return this.a;
    }

    public double getMaxValue() {
        return this.b;
    }

    @Override // com.esri.core.map.Domain
    public String toString() {
        return "RangeDomain: [ domainName:" + this.domainName + ", minValue:" + this.a + ", maxValue:" + this.b + " ]";
    }

    public static RangeDomain fromJson(JsonParser jsonParser) throws Exception {
        RangeDomain rangeDomain = new RangeDomain();
        if (jsonParser.getCurrentToken() != JsonToken.START_ARRAY) {
            return null;
        }
        while (jsonParser.nextToken() != JsonToken.END_ARRAY) {
            rangeDomain.a = jsonParser.getDoubleValue();
            jsonParser.nextToken();
            rangeDomain.b = jsonParser.getDoubleValue();
        }
        return rangeDomain;
    }

    @Override // com.esri.core.map.Domain
    public int hashCode() {
        int hashCode = super.hashCode();
        long doubleToLongBits = Double.doubleToLongBits(this.b);
        long doubleToLongBits2 = Double.doubleToLongBits(this.a);
        return (((hashCode * 31) + ((int) (doubleToLongBits ^ (doubleToLongBits >>> 32)))) * 31) + ((int) (doubleToLongBits2 ^ (doubleToLongBits2 >>> 32)));
    }

    @Override // com.esri.core.map.Domain
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (super.equals(obj) && getClass() == obj.getClass()) {
            RangeDomain rangeDomain = (RangeDomain) obj;
            return Double.doubleToLongBits(this.b) == Double.doubleToLongBits(rangeDomain.b) && Double.doubleToLongBits(this.a) == Double.doubleToLongBits(rangeDomain.a);
        }
        return false;
    }
}
